

#include <gtk/gtk.h>
#include <stdio.h>
#include <stdlib.h>


void quit_proc(void)
{
    printf("quit!\n");
    exit(0);
}

int main(int argc, char * argv[])
{
    GtkWidget * window;
    gtk_init(&argc, &argv);
    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
    gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
    gtk_widget_show(window);
    g_signal_connect(G_OBJECT(window), "destroy", G_CALLBACK(quit_proc), NULL);
    gtk_main();
    return 0;
}

